#include"processBar.h"
#include<string.h>
#include<unistd.h>

void processbar()
{
	int i = 0;
	char bar[NUM];
	memset(bar,0,sizeof(bar));
	const char *lable = "|/-\\";
	while(i<=100)
	{
		printf("[%-100s][%d%%][%c]\r",bar,i,lable[i%4]);
		fflush(stdout);
		bar[i++] = STYLE;
		usleep(50000);
	}
	printf("\n");
}
